<template>
	<view class="weekhot">
		<view class="header">
			<view class="headerleft">
				<image mode="scaleToFill" class="headerimg" src="http://img1.qunarzz.com/piao/fusion/1711/16/bfbb9874e8f11402.png"></image>
				本周热门榜单
			</view>
			<view class="headerright">
				查看更多
				<span class="iconfont">&#xe64b;</span>
			</view>
		</view>
		<view class="content">
			<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0">
				<view class="scroll-view-item_H" v-for="spot in scenicSpotList" :key="spot.id" >
					<view class="content-item" @tap="toScenicSpot(spot)">
						<image lazy-load="true" mode="widthFix" :src="spot.img"></image>
						<view class="text">{{ spot.name }}</view>
						<view class="price"><span class="mpg-price">¥<span class="price-num">{{ spot.price }}</span></span>起</view>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			scenicSpotList:{
				type:Array,
				require:true
			}
		},
		data() {
			return {
					
			};
		},
		methods:{
			toScenicSpot() {
				console.log("go ScenicSpot")
			}
		}
	}
</script>
	
<style lang="scss" scoped>
	.weekhot{
		width: 100%;
		height: 350upx;
		background-color: #fcfcfc;
		.header{
			width: 100%;
			height: 80upx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.headerleft{
				line-height: 50upx;
				font-size: 30upx;
				.headerimg{
					width: 30upx;
					height: 30upx;
					margin-left: 25upx;
				}
			}
			.headerright{
				line-height: 50upx;
				font-size: 20upx;
				color: #616161;
				.iconfont{
					line-height: 50upx;
					font-size: 30upx;
					color: #616161;
				}
			}
		}
		.content{
			.scroll-view_H{
				white-space: nowrap;
				width: 100%;
			}
				.scroll-view-item_H {
					display: inline-block;
					width: 200upx;
					height: 300upx;
					text-align: center;
					.content-item{
						width: 230upx;
						display: flex;
						flex-flow: wrap;
						justify-content: center;
						image{
							width: 185upx;
							height: 185upx;
						}
						.text{
							width: 185upx;
							font-size: 23upx;
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							display: inline-block;
						}
						.price{
							width: 185upx;
							font-size: 23upx;
							.mpg-price{
								color: #ff8300;
								.price-num{
									font-size: 28upx;
								}
							}
						}
					}
				}
		}
	}
</style>
